package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.time.LocalDate;


/**
 * 邮件实体类
 */
@TableName("t_email")
public class EmailBean {
    /**邮件id*/
    @TableId(value = "pk_emailId",type = IdType.AUTO)
    private Integer emailId;
    /**发件人*/
    @TableField(exist = false)
    private EmployeeBean sender;
    /**发件人id*/
    @TableField("fk_senderId")
    private Integer senderId;
    /**标题*/
    @TableField("e_head")
    private String head;
    /**发送日期*/
    @TableField("e_date")
    private LocalDate date=LocalDate.now();
    /**内容*/
    @TableField("e_content")
    private String content;
    /**附件*/
    @TableField("e_annex")
    private String annex;
    /**是否有效*/
    @TableField("e_status")
    private String status="有效";
    /**收件人*/
    @TableField("e_receivers")
    private String receivers;

    public EmailBean() {
    }

    public EmailBean(Integer senderId, String head, String content, String annex, String receivers) {
        this.senderId = senderId;
        this.head = head;
        this.content = content;
        this.annex = annex;
        this.receivers = receivers;
    }

    public Integer getEmailId() {
        return emailId;
    }

    public void setEmailId(Integer emailId) {
        this.emailId = emailId;
    }

    public EmployeeBean getSender() {
        return sender;
    }

    public void setSender(EmployeeBean sender) {
        this.sender = sender;
    }

    public Integer getSenderId() {
        return senderId;
    }

    public void setSenderId(Integer senderId) {
        this.senderId = senderId;
    }

    public String getHead() {
        return head;
    }

    public void setHead(String head) {
        this.head = head;
    }

    public LocalDate getDate() {
        return date;
    }

    public void setDate(LocalDate date) {
        this.date = date;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getAnnex() {
        return annex;
    }

    public void setAnnex(String annex) {
        this.annex = annex;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getReceivers() {
        return receivers;
    }

    public void setReceivers(String receivers) {
        this.receivers = receivers;
    }

    @Override
    public String toString() {
        return "EmailBean{" +
                "emailId=" + emailId +
                ", sender=" + sender +
                ", senderId=" + senderId +
                ", head='" + head + '\'' +
                ", date=" + date +
                ", content='" + content + '\'' +
                ", annex='" + annex + '\'' +
                ", status='" + status + '\'' +
                ", receivers='" + receivers + '\'' +
                "}\n";
    }
}
